#函数作为返回值
#高阶函数除了可以接受函数作为参数，还可以把函数作为返回值
def cal_sum(*args):
	ax=0
	for n in args:
		ax=ax+n
	return ax

def lazy_sum(*args):
	def sum():
		ax=0
		for n in args:
			ax=ax+n
		return ax
	return sum
f=lazy_sum(1,3,5,5,7,8)
print(f)#返回一个求和函数
##闭包  
def count(*args):
	fs=[]
	for i in args:
		def f():
			return i*i
		fs.append(f)
	return fs
f1=count()
print(f1)
class stu():
	def s():
		return 23;
	def __init__():
		print('this is init')

f=stu.s();
#print(f)
import os 
name =os.name;
print(name)